from passlib.hash import sha256_crypt


password = "aa123"

x = sha256_crypt.hash(password)
print(x)   # 每次不一样

# $5$rounds=535000$x1QVIdOaJjc59St7$VSTO88Ma4.HwJg.nXScMHWbOb.OMJ3xzCQD6Yya7yT8

y = '$5$rounds=535000$x1QVIdOaJjc59St7$VSTO88Ma4.HwJg.nXScMHWbOb.OMJ3xzCQD6Yya7yT8'
y1 = '$5$rounds=535000$0eQJbp906h11v34D$UbiEqUNFjFah3QBYRIWGRh4BwimIMYdwFN5tbOYYiY1'
# 不能解密
print(sha256_crypt.verify('aa123', y))
print(sha256_crypt.verify('aa123', y1))

